package com.logicfishsoftware.owlet.ext.drools;

import com.logicfishsoftware.owlet.app.ApplicationException;
import com.logicfishsoftware.owlet.app.Operator;
import com.logicfishsoftware.owlet.app.Service;
import com.logicfishsoftware.owlet.app.rulebase.RulebaseRuntime;

/**
 * Hello world!
 *
 */
public class DroolsRuntime 
extends RulebaseRuntime<DroolsRuntime.DroolsAtom, DroolsRuntime.DroolsContext>
{
	public interface DroolsOperator extends Operator<DroolsContext> {
		public boolean application(DroolsContext context) throws Exception;
	}
    /**
	 * @author logicfish@gmail.com
	 *
	 */
	class DroolsContext 
	extends RulebaseRuntime<DroolsAtom,DroolsContext>.RulebaseContext
	implements Service
	{

		/* (non-Javadoc)
		 * @see com.logicfishsoftware.owlet.app.app.AsyncRuntime.AsyncContext#start()
		 */
		public void start() {
			// TODO Auto-generated method stub
			
		}

		 /* (non-Javadoc)
		 * @see com.logicfishsoftware.owlet.app.app.AsyncRuntime.AsyncContext#stop()
		 */
		public void stop() {
			// TODO Auto-generated method stub
			
		}

		/* (non-Javadoc)
		 * @see com.logicfishsoftware.owlet.app.app.ApplicationRuntime.ApplicationFrame#dispose()
		 */
		public void dispose() throws ApplicationException {
			// TODO Auto-generated method stub
			
		}

		/* (non-Javadoc)
		 * @see com.logicfishsoftware.owlet.app.rulebase.RulebaseRuntime.RulebaseContext#put(java.lang.Object)
		 */
		protected <T> void put(T obj) {
			// TODO Auto-generated method stub
			
		}

		/* (non-Javadoc)
		 * @see com.logicfishsoftware.owlet.app.rulebase.RulebaseRuntime.RulebaseContext#update(java.lang.Object)
		 */
		protected <T> void update(T obj) {
			// TODO Auto-generated method stub
			
		}

	}

	/**
	 * @author logicfish@gmail.com
	 *
	 */
	public class DroolsAtom extends RulebaseRuntime<DroolsAtom,DroolsContext>.RulebaseAtom {

		/* (non-Javadoc)
		 * @see com.logicfishsoftware.owlet.app.app.ApplicationRuntime.ApplicationAtom#application(com.logicfishsoftware.owlet.app.app.ApplicationRuntime.ApplicationFrame)
		 */
		@Override
		protected boolean application(DroolsContext context) throws Exception {
			// TODO Auto-generated method stub
			return false;
		}

		/* (non-Javadoc)
		 * @see com.logicfishsoftware.owlet.app.app.ApplicationRuntime.ApplicationAtom#proceed()
		 */
		@Override
		protected DroolsAtom proceed() {
			return null;
		}

	}

//	/* (non-Javadoc)
//	 * @see com.logicfishsoftware.owlet.app.rulebase.RulebaseRuntime#fireAll(com.logicfishsoftware.owlet.app.rulebase.RulebaseRuntime.RulebaseContext)
//	 */
//	@Override
//	protected void fireAll(
//			com.logicfishsoftware.owlet.app.rulebase.RulebaseRuntime.RulebaseContext context) {
//		// TODO Auto-generated method stub
//		
//	}

	/* (non-Javadoc)
	 * @see com.logicfishsoftware.owlet.app.app.ApplicationRuntime#createFrame(com.logicfishsoftware.owlet.app.app.ApplicationRuntime.ApplicationAtom)
	 */
	@Override
	protected DroolsContext createAppContext(DroolsAtom atomic) {
		// TODO Auto-generated method stub
		return null;
	}

	public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
    }

	/* (non-Javadoc)
	 * @see com.logicfishsoftware.owlet.app.runtime.RuntimeApplication#createAtom(com.logicfishsoftware.owlet.app.Operator)
	 */
	@Override
	protected DroolsAtom createAtom(
			com.logicfishsoftware.owlet.app.Operator<? super DroolsContext> proceed)
			throws ApplicationException {
		// TODO Auto-generated method stub
		return null;
	}


}
